# Maintainer: Konstantin Gizdov <arch at kge dot pw>
# Contributor: Raphael Isemann <teemperor at gmail dot com>

pkgname=cern-vdt
_pkgname=vdt
pkgver=0.4.4
pkgrel=1
pkgdesc='A vectorised math library from CERN'
arch=('loong64' 'x86_64')
url='https://github.com/dpiparo/vdt'
license=('LGPL3')
depends=('glibc')
makedepends=('cmake' 'python')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/dpiparo/${_pkgname}/archive/v${pkgver}.tar.gz")
sha256sums=('8b1664b45ec82042152f89d171dd962aea9bb35ac53c8eebb35df1cb9c34e498')

build() {
    cd "${srcdir}/${_pkgname}-${pkgver}"

    mkdir build && cd build
    cmake .. -DCMAKE_INSTALL_PREFIX=/usr
    make
}

package() {
    cd "${srcdir}/${_pkgname}-${pkgver}/build"

    make DESTDIR="${pkgdir}/" install

    install -Dm644 ../Licence.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
